package cn.zd.thumbbackend.service;

import cn.zd.thumbbackend.model.dto.thumb.DoThumbRequest;
import cn.zd.thumbbackend.model.entity.Thumb;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletRequest;

/**
* @author zheng
* @description 针对表【thumb】的数据库操作Service
* @createDate 2025-05-20 14:44:44
*/
public interface ThumbService extends IService<Thumb> {
    
    /**
     * 点赞
     * @param doThumbRequest doThumbRequest
     * @param request request
     * @return {@link Boolean }
     */
    Boolean doThumb(DoThumbRequest doThumbRequest, HttpServletRequest request);
    
    /**
     * 取消点赞
     * @param doThumbRequest doThumbRequest
     * @param request request
     * @return {@link Boolean }
     */
    Boolean undoThumb(DoThumbRequest doThumbRequest, HttpServletRequest request);
    
    /**
     * 是否点赞
     * @param blogId blogId
     * @param userId userId
     * @return {@link Boolean }
     */
    Boolean hasThumb(Long blogId, Long userId);
    
    
}
